import java.util.*;

/** Class to contruct a history, i.e. a collection of chapters (Kapitel.java) which contain sentences (Saetning.java)
 * 
 * */


public class Historie
{
  //////////////////////////// fields ////////////////////////
   private ArrayList<Kapitel> kapitelArrayList = new ArrayList<Kapitel>();
   private int numberOfKapitels;
  
  ////////////////////////// constructors /////////////////////
   public Historie()
   {
     numberOfKapitels = GenerateRandomNumber.generateNumber();
     
     for(int i = 0; i < numberOfKapitels; i++)
    {
      Kapitel kapitelToBeAddedToArrayList = new Kapitel();
      
      kapitelArrayList.add( kapitelToBeAddedToArrayList );
    }
     
     
   }
     
  
  ///////////////////////////// methods ////////////////////////
   
   /** Method to get a particular Kapitel
     * @param kapitelNumber the Kapitel number which corresponds to the position in the ArrayList of Kapitels
     * @return a Kapitel
     * 
     * */
   
   public Kapitel getKapitel(int kapitelNumber)
   {
     return kapitelArrayList.get(kapitelNumber);
   }
   
   /** Method to get the Kapitler in this object
     * @return an ArrayList containing Kapitels
     * */
   
   public ArrayList<Kapitel> getKapitler()
   {
     return kapitelArrayList;
   }
   
   /** Method to get the number of Kapitels
     * @return the number of kapitels (int)
     * */
   
   public int getAntalKapitler()
   {
     return numberOfKapitels;
   }
}